import allure
from selenium.webdriver.common.by import By
from base.base_action import BaseAction
import allure



class SugurList(BaseAction):

    untest_day = By.XPATH,"//table/tbody/tr[1]/td[10]/div"
    abnormal_data = By.XPATH,"//span[@title='异常']//span"
    sugar_status = By.XPATH,"//span[@title='异常']//span[2]"

    @allure.step(title='获取未测量天数')
    def get_text_untestday(self):
        return self.get_text(self.untest_day)

    @allure.step(title='获取异常数值')
    def get_text_abnormal_data(self):
        return  self.get_text(self.abnormal_data)

    @allure.step(title='获取血糖状态')
    def get_text_sugar_status(self):
        return self.get_text(self.sugar_status)